{% extends 'base_with_top_menu.html' %}

{% block title %}{% endblock %}

{% block header %}{% endblock %}

{% block content %}
     
    {% block before_table %} {% endblock %}
    <script type="text/javascript">
        $(document).ready(function() {
            $("#sortable_table").tablesorter( {
                sortList: {%block order%} [[0,0]] {%endblock%},
                textExtraction: function(node) {
                    var value = $('<b>'+node.innerHTML+'</b>').text();
                    return value; //childNodes[0].childNodes[0].innerHTML; 
                }

             });
        });
    </script>

  {% if rows|length %}
    <div class="{%block itemsWrapper%}itemsWrapper{%endblock%}">
      <center>
        <table class="items tablesorter" id="sortable_table">
        <thead>
            <tr>
                {% block header_row %}
                {% endblock %}
            </tr>
        </thead>
        <tbody>
            {% for row in rows %}
                <tr class="item">
                    {% block item_row %}
                    {% endblock %}
                </tr>
            {% endfor %}
            
        </tbody>
        </table>
      </center>
    </div>
  {% endif %}
    {% block after_table %} {% endblock %}
{% endblock %}
